import React, { Component } from 'react';
import StockChangeNum from '../../Component/StockManage/StockChangeNum';
import '../../Stylesheets/wx/shoppingCarts.css';

export default class StockDesc extends Component {
    render() {
        const {title,attr,imgurl,del,changeNum,stock} = this.props
        return (
            <div className="f12 flex-1 homePage">
                <div className="di imgPlay fl mr">
                    <img src={imgurl} alt=""/>
                </div>
                <div className="di fl mr">
                    <div>
                        <span className="productShow db">{title}</span>
                        <span className="color9">{attr}</span>
                    </div>
                    <div>
                        <span className="colorff f12">我的存货量: </span><span className="colorff f2">{stock}</span>
                    </div>
                    <div className="flex" style={{marginTop:5}}>
                        <span>取货： </span>
                        <span>
                            <StockChangeNum
                                minus = {(value,type)=>changeNum(value,type)}
                                del = {value=>del(value)}
                                num = {stock}
                                stock = {stock}
                            />
                        </span>

                    </div>
                </div>


            </div>
        );
    }
}
